package com.macro.mall.feign;

import com.macro.mall.dto.WxAccessTokenReturn;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(value = "smsFeignClient", url="https://api.weixin.qq.com")
public interface SmsFeignClient {

    @PostMapping(value = "/cgi-bin/token?grant_type=client_credential&appid={appid}&secret={secret}", produces = {MediaType.APPLICATION_JSON_VALUE})
    WxAccessTokenReturn sendSms(@PathVariable String appid, @PathVariable String secret);

}
